package cn.loioi.distribution.db.sql;

public class TableSQL {

	private final String TABLE_CFG = "CREATE TABLE `distribution_cfg` ( `key` VARCHAR (32) NOT NULL, `value` VARCHAR (64) NOT NULL DEFAULT '', PRIMARY KEY (`key`)) ENGINE = INNODB DEFAULT CHARSET = utf8;";
	private final String TABLE_LEVEL = "CREATE TABLE IF NOT EXISTS `distribution_level` ( `id` INT (11) NOT NULL AUTO_INCREMENT, `level` INT (11) NOT NULL DEFAULT '0', `level_name` VARCHAR (255) DEFAULT NULL, `proportion` FLOAT (11, 3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`id`), KEY `level` (`level`)) ENGINE = INNODB DEFAULT CHARSET = utf8;";
	private final String TABLE_MEMBER = "CREATE TABLE IF NOT EXISTS `distribution_member` ( `id` INT (11) NOT NULL AUTO_INCREMENT, `code` VARCHAR (11) NOT NULL DEFAULT '0', `name` VARCHAR (255) DEFAULT NULL, `p_code` VARCHAR (11) NOT NULL, PRIMARY KEY (`id`)) ENGINE = INNODB DEFAULT CHARSET = utf8;";

	public String getTableCfg() {
		return TABLE_CFG;
	}

	public String getTableLevel() {
		return TABLE_LEVEL;
	}

	public String getTableMember() {
		return TABLE_MEMBER;
	}

}
